<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>注册-{$tpshop_config['shop_info_store_title']}</title>
    <meta http-equiv="keywords" content="{$tpshop_config['shop_info_store_keyword']}"/>
    <meta name="description" content="{$tpshop_config['shop_info_store_desc']}"/>
    <link href="__STATIC__/css/reset.css" rel="stylesheet"/>
    <link href="__STATIC__/css/reg3.css" rel="stylesheet"/>
    <link rel='stylesheet' type='text/css' href='__STATIC__/css/common2.css'>
    <link rel="stylesheet" type="text/css" href="__STATIC__/css/common.min.css">
    <script src="__PUBLIC__/js/jquery-1.10.2.min.js" type="text/javascript" ></script>
    <script src="__PUBLIC__/js/layer/layer.js"></script><!--弹窗js 参考文档 http://layer.layui.com/-->
    <script src="__PUBLIC__/js/global.js"></script>
    <style>
        .line .slstyle {
            height: 40px;
        }
        .quality{ border-top:1px solid #e5e5e5; padding:23px 0 22px; overflow:hidden; font-family:'Tahoma',\5FAE\8F6F\96C5\9ED1}
.quality li{ height:44px; line-height:44px; font-size:16px; float:left}
.quality .f2,.quality .f3{ margin-left:170px;}
.quality .f4{ float:right}
.quality .f2 i{background-position:-54px 0; }
.quality .f3 i{background-position:-108px 0; }
.quality .f4 i{background-position:-162px 0;}
.helpful dl dt{font-size:16px; line-height:1.2; padding-bottom:15px; font-family:'Tahoma',\5FAE\8F6F\96C5\9ED1; margin-left:2px}
.helpful dl dd ol li{ line-height:24px; padding-left:24px}
.helpful dl dd ol li a:hover{ color:#F00; text-decoration:underline}
.helpful dl{display:inline-block; vertical-align:top; padding-top:20px; padding-bottom:20px}
.shfw,.jszc,.gysc{ margin-left:190px}
.gzwm{float:right}
.helpful{border-top:1px solid #e5e5e5; border-bottom:1px solid #e5e5e5}
.keep-on-record{ padding-top:20px; text-align:center; color:#666; line-height:1.5; padding-bottom:20px}
    </style>
</head>
<body>
<div class="regcon">
    <a class="m-fnlogoa fn-fl" href=""><img src="{$tpshop_config['shop_info_store_logo']}"/></a><span class="m-fntit">欢迎注册</span>
    <div class="ui_tab">
        <ul class="ui_tab_nav regnav">
            <if condition="$tpshop_config['reg_reg_phone_statu'] eq 1"><li class="uli <if condition=" $_GET['t'] eq ''">active</if> "><a href="{:U('Home/User/reg/',array('tjr_accname'=>$gettjraccname))}">手机注册</a></li></if>
            <if condition="$tpshop_config['reg_reg_email_statu'] eq 1"><li class="uli <if condition=" $_GET['t'] eq 'email'">active</if> "><a href="{:U('Home/User/reg/',array('t'=>'email','tjr_accname'=>$gettjraccname))}">邮箱注册</a></li></if>
            <if condition="$tpshop_config['reg_reg_account_statu'] eq 1"><li class="uli <if condition=" $_GET['t'] eq 'account'">active</if> "><a href="{:U('Home/User/reg/',array('t'=>'account','tjr_accname'=>$gettjraccname))}">账号注册</a></li></if>
            <li class="no fn-fr loginbtn">我已注册，马上<a href="{:U('Home/User/login')}">登录></a></li>
        </ul>
        
        <if condition="$_GET['t'] eq ''">
            <form id="reg_form2_phone" onsubmit=" return check_submit(this)" method="post">
                <div class="ui_tab_content">
                    <div class="m-fnbox ui_panel" style="display: block;">
                        <div class="fnlogin clearfix">
                            <div class="line">
                                <label class="linel" style="width:100px;"><span class="dt">推荐人帐号：</span></label>
                                <div class="liner">
                                    <input type="text" value="{$uname}" readonly class="inp fmobile J_cellphone" placeholder="请输入推荐人帐号" name="tjr_accname" id="tjr_accname" required=""/>
                                    <p class="fn-fl errorbox v-txt" id=" err_tjr_accname">请输入推荐人帐号</p>
                                </div>
                            </div>
                            <div class="line">
                                <label class="linel" style="width:100px;"><span class="dt">手机号码：</span></label>
                                <div class="liner">
                                    <input type="text" class="inp fmobile J_cellphone" placeholder="请输入手机号码" name="username" id="username" required=""/>
                                    <p class="fn-fl errorbox v-txt" id="err_username">手机号码输入不正确</p>
                                </div>
                            </div>
                            <if condition="$tpshop_config['sms_regis_sms_enable'] eq 1">
                                <div class="line">
                                    <label class="linel" style="width:100px;"><span class="dt">手机验证码：</span></label>
                                    <div class="liner">
                                        <input type="text" class="inp imgcode J_imgcode" placeholder="手机验证码" id="code" name="code" required=""/>
                                        <button class="fn-fl icode" id="sendSms" onclick="send_sms_reg_code()" type="button" id="count_down">
                                            发送
                                        </button>
                                        <p class="fn-fl errorbox v-txt" id="err_code">验证码输入不正确</p>
                                    </div>
                                    <div id="show-voice" class="show-voice"></div>
                                </div>
                            </if>
                            <div class="line">
                                <label class="linel" style="width:100px;"><span class="dt">设置登录密码：</span></label>
                                <div class="liner">
                                    <input type="password" class="inp fpass J_password" placeholder="6-16位大小写英文字母、数字或符号的组合" autocomplete="off" maxlength="16" id="password" name="password" value="{$tpshop_config['reg_pass']}" required=""/>黙认登录密码：{$tpshop_config['reg_pass']}
                                    <p class="fn-fl noticebox v-txt2" id="err_password">6-16位字符，建议由字母、数字和符号两种以上组合</p>
                                </div>
                            </div>
                            <div class="line">
                                <label class="linel" style="width:100px;"><span class="dt">确认登录密码：</span></label>
                                <div class="liner">
                                    <input type="password" class="inp fsecpass J_password2" placeholder="请再次输入密码" autocomplete="off" maxlength="16" id="password2" name="password2" required="" value="{$tpshop_config['reg_pass']}"/>黙认登录密码：{$tpshop_config['reg_pass']}
                                    <p class="fn-fl errorbox v-txt" id="err_password2">两次输入密码不一致</p>
                                </div>
                            </div>
                            <div class="line">
                                <label class="linel" style="width:100px;"><span class="dt">交易密码：</span></label>
                                <div class="liner">
                                    <input type="password" class="inp fpass J_password" placeholder="6-16位大小写英文字母、数字或符号的组合" autocomplete="off" maxlength="16" id="secpwd" name="secpwd" required="" value="{$tpshop_config['reg_repass']}"/>黙认交易密码：{$tpshop_config['reg_repass']}
                                    <p class="fn-fl noticebox v-txt2" id="err_secpwd">6-16位字符，建议由字母、数字和符号两种以上组合</p>
                                </div>
                            </div>
                            <div class="line">
                                <label class="linel" style="width:100px;"><span class="dt">确认交易密码：</span></label>
                                <div class="liner">
                                    <input type="password" class="inp fsecpass J_password2" placeholder="请再次输入二级密码" autocomplete="off" maxlength="16" id="secpwd2" name="secpwd2" required=""  value="{$tpshop_config['reg_repass']}"/>黙认交易密码：{$tpshop_config['reg_repass']}
                                    <p class="fn-fl errorbox v-txt" id="err_secpwd2">两次输入交易密码不一致</p>
                                </div>
                            </div>
                            
                            <if condition="$tpshop_config['reg_reg_bt_2'] eq 1">
                                <div class="line">
                                    <label class="linel" style="width:100px;"><span class="dt">呢 称：</span></label>
                                    <div class="liner"><input type="text" class="inp fsecpass J_password2" placeholder="请输入呢 称" autocomplete="off"  name="nickname" required="" id="nickname"/></div>
                                    <p class="fn-fl errorbox v-txt" id="err_nickname">呢 称不能为空</p>
                                </div>
                            </if>
                            <if condition="$tpshop_config['reg_reg_bt_7'] eq 1">
                                <div class="line">
                                    <label class="linel" style="width:100px;"><span class="dt">开户银行：</span></label>
                                    <div class="liner"><input type="text" class="inp fsecpass J_password2" placeholder="请输入开户银行" autocomplete="off"  name="bank_opening" required=""/></div>
                                </div>
                            </if>
                            <if condition="$tpshop_config['reg_reg_bt_8'] eq 1">
                                <div class="line">
                                    <label class="linel" style="width:100px;"><span class="dt">分行支行：</span></label>
                                    <div class="liner"><input type="text" class="inp fsecpass J_password2" placeholder="请输入分行支行" autocomplete="off"  name="bank_address" required=""/></div>
                                </div>
                            </if>
                            <if condition="$tpshop_config['reg_reg_bt_1'] eq 1">
                                <div class="line">
                                    <label class="linel" style="width:100px;"><span class="dt">开户姓名：</span></label>
                                    <div class="liner"><input type="text" class="inp fsecpass J_password2" placeholder="请输入开户姓名" autocomplete="off"  name="bank_name" required=""/></div>
                                </div>
                            </if>
                            <if condition="$tpshop_config['reg_reg_bt_9'] eq 1">
                                <div class="line">
                                    <label class="linel" style="width:100px;"><span class="dt">银行账号：</span></label>
                                    <div class="liner"><input type="text" class="inp fsecpass J_password2" placeholder="请输入银行账号" autocomplete="off"  name="bank_account" required=""/></div>
                                </div>
                            </if>
                            <if condition="$tpshop_config['reg_reg_bt_3'] eq 1">
                                <div class="line">
                                    <label class="linel" style="width:100px;"><span class="dt">微信账号：</span></label>
                                    <div class="liner"><input type="text" class="inp fsecpass J_password2" placeholder="请输入微信账号" autocomplete="off"  name="weixin" required=""/></div>
                                </div>
                            </if>
                            <if condition="$tpshop_config['reg_reg_bt_4'] eq 1">
                                <div class="line">
                                    <label class="linel" style="width:100px;"><span class="dt">QQ 账号：</span></label>
                                    <div class="liner"><input type="text" class="inp fsecpass J_password2" placeholder="请输入Q Q 账号" autocomplete="off"  name="qq" required=""/></div>
                                </div>
                            </if>
                            <if condition="$tpshop_config['reg_reg_bt_6'] eq 1">
                                <div class="line">
                                    <label class="linel" style="width:100px;"><span class="dt">支付宝：</span></label>
                                    <div class="liner"><input type="text" class="inp fsecpass J_password2" placeholder="请输入支付宝账号" autocomplete="off"  name="zfb" required=""/></div>
                                </div>
                            </if>
                            <if condition="$tpshop_config['reg_is_reg_card_statu'] eq 1">
                                <div class="line">
                                    <label class="linel" style="width:100px;"><span class="dt">身份证号：</span></label>
                                    <div class="liner"><input type="text" class="inp fsecpass J_password2" placeholder="请输入身份证号" autocomplete="off"  name="card" required=""/></div>
                                </div>
                            </if>
                            
                            <div class="line">
                                <label class="linel" style="width:100px;"><span class="dt">会员级别：</span></label>
                                <div class="liner">
                                    <select class="inp imgcode J_imgcode slstyle" name="level" style="width: 310px;">
                                        <option value="0">请选择</option>
                                        <volist name="lever" id="p">
                                            <option value="{$p.level_id}">{$p.level_name} - {$p.amount} 元</option>
                                        </volist>
                                    </select>
                                </div>
                            </div>
                            <div class="line">
                                <label class="linel" style="width:100px;"><span class="dt">联系地址：</span></label>
                                <div class="liner">
                                    <select class="inp imgcode J_imgcode slstyle" name="province" id="province" onChange="get_city(this)">
                                        <option value="0">请选择</option>
                                        <volist name="province" id="p">
                                            <option value="{$p.id}">{$p.name}</option>
                                        </volist>
                                    </select>

                                    <select class="inp imgcode J_imgcode slstyle" name="city" id="city" onChange="get_area(this)">
                                        <option value="0">请选择</option>
                                        <volist name="city" id="p">
                                            <option value="{$p.id}">{$p.name}</option>
                                        </volist>
                                    </select>

                                    <select class="inp imgcode J_imgcode slstyle" name="district" id="district" onChange="get_twon(this)">
                                        <option value="0">请选择</option>
                                        <volist name="district" id="p">
                                            <option value="{$p.id}">{$p.name}</option>
                                        </volist>
                                    </select>

                                    <select class="inp imgcode J_imgcode slstyle" style="display:none;" name="twon" id="twon">
                                        <volist name="twon" id="p">
                                            <option value="{$p.id}">{$p.name}</option>
                                        </volist>
                                    </select>
                                    <p class="fn-fl errorbox v-txt" id="err_city2">请选择完整的地址</p>
                                    <br>
                                </div>
                            </div>
                            <div class="line">
                                <label class="linel" style="width:100px;"><span class="dt">图像验证码：</span></label>
                                <div class="liner">
                                    <input type="text" class="inp imgcode J_imgcode" placeholder="图像验证码" id="verify_code2" name="verify_code" required=""/>
                                    <img width="100" height="35" src="/index.php/Home/User/verify/type/user_reg.html" id="reflsh_code2" class="po-ab to0">
                                    <a><img onclick="verify('reflsh_code2')" src="__STATIC__/images/chg_image.png" class="ma-le-210"></a>
                                    <p class="fn-fl errorbox v-txt" id="err_verify_code">请输入验证码</p>
                                </div>
                                <div id="show-voice2" class="show-voice"></div>
                            </div>
                            <div class="line liney clearfix">
                                <label class="linel">&nbsp;</label>
                                <div class="liner">
                                    <div class="clearfix checkcon">
                                        <p class="fn-fl checktxt">
                                            <input type="checkbox" class="iyes fn-fl J_protocal" checked/>
                                            <span class="fn-fl">我已阅读并同意</span><a class="itxt fn-fl" href="{:U('Home/Topic/detail/topic_id/2')}" target="_blank" value="{$tpshop_config['reg_repass']}">《{$tpshop_config['shop_info_store_name']}注册协议》</a>
                                        </p>
                                        <p class="fn-fl errorbox v-txt" id="protocalBox"></p>
                                    </div>
                                    <a class="regbtn J_btn_agree" href="javascript:void(0);" onClick="$('#reg_form2_phone').submit();">同意协议并注册</a>
                                    <p class="v-txt">
                                        <span class="fnred">请勾选</span>我已阅读并同意<a class="itxt" href="{:U('Home/Topic/detail/topic_id/2')}" target="_blank" value="{$tpshop_config['reg_repass']}">《{$tpshop_config['shop_info_store_name']}注册协议》</a>
                                    </p>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </form>
        </if>
           
        <if condition="$_GET['t'] eq 'email'">
            <form id="reg_form2_email" onsubmit=" return check_submit(this)" method="post">
                <div class="ui_tab_content">
                    <div class="m-fnbox ui_panel" style="display: block;">
                        <div class="fnlogin clearfix">
                            <div class="line">
                                <label class="linel" style="width:100px;"><span class="dt">推荐人帐号：</span></label>
                                <div class="liner">
                                    <input type="text" value="{$uname}" readonly class="inp fmobile J_cellphone" placeholder="请输入推荐人帐号" name="tjr_accname" id="tjr_accname" required=""/>
                                    <p class="fn-fl errorbox v-txt" id="err_tjr_accname">请输入推荐人帐号</p>
                                </div>
                            </div>
                            <div class="line">
                                <label class="linel" style="width:100px;"><span class="dt">邮箱：</span></label>
                                <div class="liner">
                                    <input type="text" class="inp J_cellphone" placeholder="请输入邮箱" name="username" id="username" required=""/>
                                    <p class="fn-fl errorbox v-txt" id="err_username">邮箱输入不正确</p>
                                </div>
                            </div>
                            <div class="line">
                                <label class="linel" style="width:100px;"><span class="dt">设置登录密码：</span></label>
                                <div class="liner">
                                    <input type="password" class="inp fpass J_password" placeholder="6-16位大小写英文字母、数字或符号的组合" autocomplete="off" maxlength="16" id="password" name="password" value="{$tpshop_config['reg_pass']}" required=""/>黙认登录密码：{$tpshop_config['reg_pass']}
                                    <p class="fn-fl noticebox v-txt2" id="err_password">6-16位字符，建议由字母、数字和符号两种以上组合</p>
                                </div>
                            </div>
                            <div class="line">
                                <label class="linel" style="width:100px;"><span class="dt">确认登录密码：</span></label>
                                <div class="liner">
                                    <input type="password" class="inp fsecpass J_password2" placeholder="请再次输入密码" autocomplete="off" maxlength="16" id="password2" name="password2" required="" value="{$tpshop_config['reg_pass']}"/>黙认登录密码：{$tpshop_config['reg_pass']}
                                    <p class="fn-fl errorbox v-txt" id="err_password2">两次输入密码不一致</p>
                                </div>
                            </div>
                            <div class="line">
                                <label class="linel" style="width:100px;"><span class="dt">交易密码：</span></label>
                                <div class="liner">
                                    <input type="password" class="inp fpass J_password" placeholder="6-16位大小写英文字母、数字或符号的组合" autocomplete="off" maxlength="16" id="secpwd" name="secpwd" required="" value="{$tpshop_config['reg_repass']}"/>黙认交易密码：{$tpshop_config['reg_repass']}
                                    <p class="fn-fl noticebox v-txt2" id="err_secpwd">6-16位字符，建议由字母、数字和符号两种以上组合</p>
                                </div>
                            </div>
                            <div class="line">
                                <label class="linel" style="width:100px;"><span class="dt">确认交易密码：</span></label>
                                <div class="liner">
                                    <input type="password" class="inp fsecpass J_password2" placeholder="请再次输入二级密码" autocomplete="off" maxlength="16" id="secpwd2" name="secpwd2" required="" value="{$tpshop_config['reg_repass']}"/>黙认交易密码：{$tpshop_config['reg_repass']}
                                    <p class="fn-fl errorbox v-txt" id="err_secpwd2">两次输入交易密码不一致</p>
                                </div>
                            </div>
                            
                            <if condition="$tpshop_config['reg_reg_bt_2'] eq 1">
                                <div class="line">
                                    <label class="linel" style="width:100px;"><span class="dt">呢 称：</span></label>
                                    <div class="liner"><input type="text" class="inp fsecpass J_password2" placeholder="请输入呢 称" autocomplete="off"  name="nickname" required="" id="nickname"/></div>
                                    <p class="fn-fl errorbox v-txt" id="err_nickname">呢 称不能为空</p>
                                </div>
                            </if>
                            <if condition="$tpshop_config['reg_reg_bt_7'] eq 1">
                                <div class="line">
                                    <label class="linel" style="width:100px;"><span class="dt">开户银行：</span></label>
                                    <div class="liner"><input type="text" class="inp fsecpass J_password2" placeholder="请输入开户银行" autocomplete="off"  name="bank_opening" required=""/></div>
                                </div>
                            </if>
                            <if condition="$tpshop_config['reg_reg_bt_8'] eq 1">
                                <div class="line">
                                    <label class="linel" style="width:100px;"><span class="dt">分行支行：</span></label>
                                    <div class="liner"><input type="text" class="inp fsecpass J_password2" placeholder="请输入分行支行" autocomplete="off"  name="bank_address" required=""/></div>
                                </div>
                            </if>
                            <if condition="$tpshop_config['reg_reg_bt_1'] eq 1">
                                <div class="line">
                                    <label class="linel" style="width:100px;"><span class="dt">开户姓名：</span></label>
                                    <div class="liner"><input type="text" class="inp fsecpass J_password2" placeholder="请输入开户姓名" autocomplete="off"  name="bank_name" required=""/></div>
                                </div>
                            </if>
                            <if condition="$tpshop_config['reg_reg_bt_9'] eq 1">
                                <div class="line">
                                    <label class="linel" style="width:100px;"><span class="dt">银行账号：</span></label>
                                    <div class="liner"><input type="text" class="inp fsecpass J_password2" placeholder="请输入银行账号" autocomplete="off"  name="bank_account" required=""/></div>
                                </div>
                            </if>
                            <if condition="$tpshop_config['reg_reg_bt_3'] eq 1">
                                <div class="line">
                                    <label class="linel" style="width:100px;"><span class="dt">微信账号：</span></label>
                                    <div class="liner"><input type="text" class="inp fsecpass J_password2" placeholder="请输入微信账号" autocomplete="off"  name="weixin" required=""/></div>
                                </div>
                            </if>
                            <if condition="$tpshop_config['reg_reg_bt_4'] eq 1">
                                <div class="line">
                                    <label class="linel" style="width:100px;"><span class="dt">QQ 账号：</span></label>
                                    <div class="liner"><input type="text" class="inp fsecpass J_password2" placeholder="请输入Q Q 账号" autocomplete="off"  name="qq" required=""/></div>
                                </div>
                            </if>
                            <if condition="$tpshop_config['reg_reg_bt_6'] eq 1">
                                <div class="line">
                                    <label class="linel" style="width:100px;"><span class="dt">支付宝：</span></label>
                                    <div class="liner"><input type="text" class="inp fsecpass J_password2" placeholder="请输入支付宝账号" autocomplete="off"  name="zfb" required=""/></div>
                                </div>
                            </if>
                            <if condition="$tpshop_config['reg_is_reg_card_statu'] eq 1">
                                <div class="line">
                                    <label class="linel" style="width:100px;"><span class="dt">身份证号：</span></label>
                                    <div class="liner"><input type="text" class="inp fsecpass J_password2" placeholder="请输入身份证号" autocomplete="off"  name="card" required=""/></div>
                                </div>
                            </if>
                            
                            
                            <div class="line">
                                <label class="linel" style="width:100px;"><span class="dt">会员级别：</span></label>
                                <div class="liner">
                                    <select class="inp imgcode J_imgcode slstyle" name="level"  style="width: 310px;">
                                        <option value="0">请选择</option>
                                        <volist name="lever" id="p">
                                            <option value="{$p.level_id}">{$p.level_name} - {$p.amount} 元</option>
                                        </volist>
                                    </select>
                                </div>
                            </div>
                            <div class="line">
                                <label class="linel" style="width:100px;"><span class="dt">联系地址：</span></label>
                                <div class="liner">
                                    <select class="inp imgcode J_imgcode slstyle" name="province" id="province" onChange="get_city(this)">
                                        <option value="0">请选择</option>
                                        <volist name="province" id="p">
                                            <option value="{$p.id}">{$p.name}</option>
                                        </volist>
                                    </select>
                                    <select class="inp imgcode J_imgcode slstyle" name="city" id="city" onChange="get_area(this)">
                                        <option value="0">请选择</option>
                                        <volist name="city" id="p">
                                            <option value="{$p.id}">{$p.name}</option>
                                        </volist>
                                    </select>
                                    <select class="inp imgcode J_imgcode slstyle" name="district" id="district" onChange="get_twon(this)">
                                        <option value="0">请选择</option>
                                        <volist name="district" id="p">
                                            <option value="{$p.id}">{$p.name}</option>
                                        </volist>
                                    </select>
                                    <select class="inp imgcode J_imgcode slstyle" style="display:none;" name="twon" id="twon">
                                        <volist name="twon" id="p">
                                            <option value="{$p.id}">{$p.name}</option>
                                        </volist>
                                    </select>
                                    <p class="fn-fl errorbox v-txt" id="err_city2">请选择完整的地址</p>
                                    <br>
                                </div>
                            </div>
                            <div class="line">
                                <label class="linel" style="width:100px;"><span class="dt">图像验证码：</span></label>
                                <div class="liner">
                                    <input type="text" class="inp imgcode J_imgcode" placeholder="图像验证码" id="verify_code2" name="verify_code" required=""/>
                                    <img width="100" height="35" src="/index.php/Home/User/verify/type/user_reg.html" id="reflsh_code2" class="po-ab to0">
                                    <a><img onclick="verify('reflsh_code2')" src="__STATIC__/images/chg_image.png" class="ma-le-210"></a>
                                    <p class="fn-fl errorbox v-txt" id="err_verify_code">请输入验证码</p>
                                </div>
                                <div id="show-voice" class="show-voice"></div>
                            </div>
                            <div class="line liney clearfix">
                                <label class="linel">&nbsp;</label>
                                <div class="liner">
                                    <div class="clearfix checkcon">
                                        <p class="fn-fl checktxt">
                                            <input type="checkbox" class="iyes fn-fl J_protocal" checked/>
                                            <span class="fn-fl">我已阅读并同意</span><a class="itxt fn-fl" href="{:U('Home/Topic/detail/topic_id/2')}" target="_blank">《{$tpshop_config['shop_info_store_name']}注册协议》</a>
                                        </p>
                                        <p class="fn-fl errorbox v-txt" id="protocalBox"></p>
                                    </div>
                                    <a class="regbtn J_btn_agree" href="javascript:void(0);" onClick="$('#reg_form2_email').submit();">同意协议并注册</a>
                                    <p class="v-txt">
                                        <span class="fnred">请勾选</span>我已阅读并同意<a class="itxt" href="{:U('Home/Topic/detail/topic_id/2')}" target="_blank">《{$tpshop_config['shop_info_store_name']}注册协议》</a>
                                    </p>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </form>
        </if>
        <if condition="$_GET['t'] eq 'account'">
            <form id="reg_form2_email" onsubmit=" return check_submit(this)" method="post">
                <div class="ui_tab_content">
                    <div class="m-fnbox ui_panel" style="display: block;">
                        <div class="fnlogin clearfix">
                            <div class="line">
                                <label class="linel" style="width:100px;"><span class="dt">推荐人帐号：</span></label>
                                <div class="liner">
                                    <input type="text" value="{$uname}" readonly class="inp fmobile J_cellphone" placeholder="请输入推荐人帐号" name="tjr_accname" id="tjr_accname" required=""/>
                                    <p class="fn-fl errorbox v-txt" id="err_tjr_accname">请输入推荐人帐号</p>
                                </div>
                            </div>
                            <div class="line">
                                <label class="linel" style="width:100px;"><span class="dt">帐号：</span></label>
                                <div class="liner">
                                    <input type="text" class="inp J_cellphone" placeholder="请输入由英文字母和数字组成的帐号" value="<if condition='$tpshop_config.reg_is_accoutn eq 1'> {$account} </if>" name="username" id="username" required=""/> <a href="">换一个</a>
                                    <p class="fn-fl errorbox v-txt" id="err_username">帐号不能为空</p>
                                </div>
                            </div>
                            <div class="line">
                                <label class="linel" style="width:100px;"><span class="dt">设置登录密码：</span></label>
                                <div class="liner">
                                    <input type="password" class="inp fpass J_password" placeholder="6-16位大小写英文字母、数字或符号的组合" autocomplete="off" maxlength="16" id="password" name="password" value="{$tpshop_config['reg_pass']}" required=""/>黙认登录密码：{$tpshop_config['reg_pass']}
                                    <p class="fn-fl noticebox v-txt2" id="err_password">6-16位字符，建议由字母、数字和符号两种以上组合</p>
                                </div>
                            </div>
                            <div class="line">
                                <label class="linel" style="width:100px;"><span class="dt">确认登录密码：</span></label>
                                <div class="liner">
                                    <input type="password" class="inp fsecpass J_password2" placeholder="请再次输入密码" autocomplete="off" maxlength="16" id="password2" name="password2" required="" value="{$tpshop_config['reg_pass']}"/>黙认登录密码：{$tpshop_config['reg_pass']}
                                    <p class="fn-fl errorbox v-txt" id="err_password2">两次输入密码不一致</p>
                                </div>
                            </div>
                            <div class="line">
                                <label class="linel" style="width:100px;"><span class="dt">交易密码：</span></label>
                                <div class="liner">
                                    <input type="password" class="inp fpass J_password" placeholder="6-16位大小写英文字母、数字或符号的组合" autocomplete="off" maxlength="16" id="secpwd" name="secpwd" required="" value="{$tpshop_config['reg_repass']}"/>黙认交易密码：{$tpshop_config['reg_repass']}
                                    <p class="fn-fl noticebox v-txt2" id="err_secpwd">6-16位字符，建议由字母、数字和符号两种以上组合</p>
                                </div>
                            </div>
                            <div class="line">
                                <label class="linel" style="width:100px;"><span class="dt">确认交易密码：</span></label>
                                <div class="liner">
                                    <input type="password" class="inp fsecpass J_password2" placeholder="请再次输入二级密码" autocomplete="off" maxlength="16" id="secpwd2" name="secpwd2" required="" value="{$tpshop_config['reg_repass']}"/>黙认交易密码：{$tpshop_config['reg_repass']}
                                    <p class="fn-fl errorbox v-txt" id="err_secpwd2">两次输入交易密码不一致</p>
                                </div>
                            </div>
                            
                            <if condition="$tpshop_config['reg_reg_bt_2'] eq 1">
                                <div class="line">
                                    <label class="linel" style="width:100px;"><span class="dt">呢 称：</span></label>
                                    <div class="liner"><input type="text" class="inp fsecpass J_password2" placeholder="请输入呢 称" autocomplete="off"  name="nickname" required="" id="nickname"/></div>
                                    <p class="fn-fl errorbox v-txt" id="err_nickname">呢 称不能为空</p>
                                </div>
                            </if>
                            <if condition="$tpshop_config['reg_reg_bt_7'] eq 1">
                                <div class="line">
                                    <label class="linel" style="width:100px;"><span class="dt">开户银行：</span></label>
                                    <div class="liner"><input type="text" class="inp fsecpass J_password2" placeholder="请输入开户银行" autocomplete="off"  name="bank_opening" required=""/></div>
                                </div>
                            </if>
                            <if condition="$tpshop_config['reg_reg_bt_8'] eq 1">
                                <div class="line">
                                    <label class="linel" style="width:100px;"><span class="dt">分行支行：</span></label>
                                    <div class="liner"><input type="text" class="inp fsecpass J_password2" placeholder="请输入分行支行" autocomplete="off"  name="bank_address" required=""/></div>
                                </div>
                            </if>
                            <if condition="$tpshop_config['reg_reg_bt_1'] eq 1">
                                <div class="line">
                                    <label class="linel" style="width:100px;"><span class="dt">开户姓名：</span></label>
                                    <div class="liner"><input type="text" class="inp fsecpass J_password2" placeholder="请输入开户姓名" autocomplete="off"  name="bank_name" required=""/></div>
                                </div>
                            </if>
                            <if condition="$tpshop_config['reg_reg_bt_9'] eq 1">
                                <div class="line">
                                    <label class="linel" style="width:100px;"><span class="dt">银行账号：</span></label>
                                    <div class="liner"><input type="text" class="inp fsecpass J_password2" placeholder="请输入银行账号" autocomplete="off"  name="bank_account" required=""/></div>
                                </div>
                            </if>
                            <if condition="$tpshop_config['reg_reg_bt_3'] eq 1">
                                <div class="line">
                                    <label class="linel" style="width:100px;"><span class="dt">微信账号：</span></label>
                                    <div class="liner"><input type="text" class="inp fsecpass J_password2" placeholder="请输入微信账号" autocomplete="off"  name="weixin" required=""/></div>
                                </div>
                            </if>
                            <if condition="$tpshop_config['reg_reg_bt_4'] eq 1">
                                <div class="line">
                                    <label class="linel" style="width:100px;"><span class="dt">QQ 账号：</span></label>
                                    <div class="liner"><input type="text" class="inp fsecpass J_password2" placeholder="请输入Q Q 账号" autocomplete="off"  name="qq" required=""/></div>
                                </div>
                            </if>
                            <if condition="$tpshop_config['reg_reg_bt_6'] eq 1">
                                <div class="line">
                                    <label class="linel" style="width:100px;"><span class="dt">支付宝：</span></label>
                                    <div class="liner"><input type="text" class="inp fsecpass J_password2" placeholder="请输入支付宝账号" autocomplete="off"  name="zfb" required=""/></div>
                                </div>
                            </if>
                            <if condition="$tpshop_config['reg_is_reg_card_statu'] eq 1">
                                <div class="line">
                                    <label class="linel" style="width:100px;"><span class="dt">身份证号：</span></label>
                                    <div class="liner"><input type="text" class="inp fsecpass J_password2" placeholder="请输入身份证号" autocomplete="off"  name="card" required=""/></div>
                                </div>
                            </if>
                            
                            
                            <div class="line">
                                <label class="linel" style="width:100px;"><span class="dt">会员级别：</span></label>
                                <div class="liner">
                                    <select class="inp imgcode J_imgcode slstyle" name="level"  style="width: 310px;">
                                        <option value="0">请选择</option>
                                        <volist name="lever" id="p">
                                            <option value="{$p.level_id}">{$p.level_name} - {$p.amount} 元</option>
                                        </volist>
                                    </select>
                                </div>
                            </div>
                            <div class="line">
                                <label class="linel" style="width:100px;"><span class="dt">联系地址：</span></label>
                                <div class="liner">
                                    <select class="inp imgcode J_imgcode slstyle" name="province" id="province" onChange="get_city(this)">
                                        <option value="0">请选择</option>
                                        <volist name="province" id="p">
                                            <option value="{$p.id}">{$p.name}</option>
                                        </volist>
                                    </select>
                                    <select class="inp imgcode J_imgcode slstyle" name="city" id="city" onChange="get_area(this)">
                                        <option value="0">请选择</option>
                                        <volist name="city" id="p">
                                            <option value="{$p.id}">{$p.name}</option>
                                        </volist>
                                    </select>
                                    <select class="inp imgcode J_imgcode slstyle" name="district" id="district" onChange="get_twon(this)">
                                        <option value="0">请选择</option>
                                        <volist name="district" id="p">
                                            <option value="{$p.id}">{$p.name}</option>
                                        </volist>
                                    </select>
                                    <select class="inp imgcode J_imgcode slstyle" style="display:none;" name="twon" id="twon">
                                        <volist name="twon" id="p">
                                            <option value="{$p.id}">{$p.name}</option>
                                        </volist>
                                    </select>
                                    <p class="fn-fl errorbox v-txt" id="err_city2">请选择完整的地址</p>
                                    <br>
                                </div>
                            </div>
                            <div class="line">
                                <label class="linel" style="width:100px;"><span class="dt">图像验证码：</span></label>
                                <div class="liner">
                                    <input type="text" class="inp imgcode J_imgcode" placeholder="图像验证码" id="verify_code2" name="verify_code" required=""/>
                                    <img width="100" height="35" src="/index.php/Home/User/verify/type/user_reg.html" id="reflsh_code2" class="po-ab to0">
                                    <a><img onclick="verify('reflsh_code2')" src="__STATIC__/images/chg_image.png" class="ma-le-210"></a>
                                    <p class="fn-fl errorbox v-txt" id="err_verify_code">请输入验证码</p>
                                </div>
                                <div id="show-voice" class="show-voice"></div>
                            </div>
                            <div class="line liney clearfix">
                                <label class="linel">&nbsp;</label>
                                <div class="liner">
                                    <div class="clearfix checkcon">
                                        <p class="fn-fl checktxt">
                                            <input type="checkbox" class="iyes fn-fl J_protocal" checked/>
                                            <span class="fn-fl">我已阅读并同意</span><a class="itxt fn-fl" href="{:U('Home/Topic/detail/topic_id/2')}" target="_blank">《{$tpshop_config['shop_info_store_name']}注册协议》</a>
                                        </p>
                                        <p class="fn-fl errorbox v-txt" id="protocalBox"></p>
                                    </div>
                                    <a class="regbtn J_btn_agree" href="javascript:void(0);" onClick="$('#reg_form2_email').submit();">同意协议并注册</a>
                                    <p class="v-txt">
                                        <span class="fnred">请勾选</span>我已阅读并同意<a class="itxt" href="{:U('Home/Topic/detail/topic_id/2')}" target="_blank">《{$tpshop_config['shop_info_store_name']}注册协议》</a>
                                    </p>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </form>
        </if>
    </div>
</div>
</div>
<include file="Public/footer"/>
<script>

    $(document).ready(function () {
        $('input').click(function () {
            $(this).siblings('p').hide();
        });

    });

    // 普通 图形验证码
    function verify(id) {
        $('#' + id).attr('src', '/index.php?m=Home&c=User&a=verify&type=user_reg&r=' + Math.random());
    }
    function check_submit() {
        var username = $('input[name="username"]').val();
        var password = $('#password').val();
        var secpwd = $('#secpwd').val();
        var secpwd2 = $('#secpwd2').val();
        var tjr_accname = $('#tjr_accname').val();
        var password2 = $('input[name="password2"]').val();
        var verify_code = $('input[name="verify_code"]').val();
        var agree = $('input[type="checkbox"]:checked').val();
        var error = '';
        
        $("p[id^='err_']").each(function () {
            $(this).hide();
        });

        (username == '') && $('#err_username').show();
        ($.trim($('#code').val()) == '') && $('#err_code').show();
        (password == '') && $('#err_password').show();
        (password2 != password) && $('#err_password2').show();
        (secpwd == '') && $('#err_secpwd').show();
        (secpwd2 != secpwd) && $('#err_secpwd2').show();
        (tjr_accname == '') && $('#err_tjr_accname').show();
        (verify_code == '') && $('#err_verify_code').show();
        if ($('#username').hasClass('fmobile')) {
            if (!checkMobile(username)) {
                $('#err_username').show();
            }
        } else if($('#username').hasClass('email')){
            if (!checkEmail(username)) {
                $('#err_username').show();
            }
        }else{
            if (username == '') {
                $('#err_username').show();
            }
        }
        if ($("p[id^='err_']:visible").length > 0)
            return false;
        
        
    }
    // 电子邮件注册  和 手机号码注册 切换
    function reg_tab(id, id2) {
        $('#' + id).addClass('ema-tab');
        $('#' + id2).removeClass('ema-tab');
        $('#' + id + '_div').show();
        $('#' + id2 + '_div').hide();
    }
    // 发送手机短信
    function send_sms_reg_code() {
        var mobile = $('input[name="username"]').val();
        if (!checkMobile(mobile)) {
            layer.alert('请输入正确的手机号码', {icon: 2});//alert('请输入正确的手机号码');
            return;
        }
        var url = "/index.php?m=Home&c=User&a=send_sms_reg_code&mobile=" + mobile;
        $.get(url, function (data) {
            obj = $.parseJSON(data);
            if (obj.status == 1) {
                $('#sendSms').attr("disabled", "disabled");
                intAs = {$sms_time_out}; // 手机短信超时时间
                jsInnerTimeout('sendSms', intAs);
            }
            layer.alert(obj.msg, {icon: 1});// alert(obj.msg);
        })
    }

    $('#count_down').removeAttr("disabled");
    //倒计时函数
    function jsInnerTimeout(id, intAs) {
        var codeObj = $("#" + id);
        //var intAs = parseInt(codeObj.attr("IntervalTime"));

        intAs--;
        if (intAs <= -1) {
            codeObj.removeAttr("disabled");
//            codeObj.attr("IntervalTime",60);
            codeObj.text("发送");
            return true;
        }

        codeObj.text(intAs + '秒');
//        codeObj.attr("IntervalTime",intAs);

        setTimeout("jsInnerTimeout('" + id + "'," + intAs + ")", 1000);
    }
    ;


    function checkMobile(tel) {
        var reg = /(^1[3|4|5|7|8][0-9]{9}$)/;
        if (reg.test(tel)) {
            return true;
        } else {
            return false;
        }
        ;
    }

    function checkEmail(str) {
        var reg = /^([a-zA-Z0-9]+[_|\-|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\-|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/;
        if (reg.test(str)) {
            return true;
        } else {
            return false;
        }
    }
</script>
</body>
</html>
